package org.zcq100.GUI.test1;

import javax.swing.JDialog;
import javax.swing.JLabel;

public class MyDialg extends JDialog {
	public MyDialg() {
		init();
	}

	public MyDialg(String str) {
		lbl1=new JLabel(str);
		init();
	}
	
	public void setLabel(JLabel lbl){
		this.lbl1=lbl;
		lbl1.repaint();
		repaint();
	}
	
	private void init() {
		add(lbl1);
		setSize(100,100);
		setVisible(true);
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);
	}
	
	private JLabel lbl1=new JLabel("Default value");
}
